<template>
    <div class="app-container">
        <el-divider content-position="center">运行技术规范事件监测与预警</el-divider>
        <el-row :gutter="24">
            <el-col :span="12" :xs="12">
                <el-card style="max-width: 680px">

                    <template #header>
                        <div class="card-header">
                            <span>技术规范数据库</span>
                        </div>
                    </template>
                    <el-form ref="menuRef" :model="form" :rules="rules" label-width="150px">
                        <el-row>
                            <el-col :span="24">
                                <el-form-item label="选择设备：" style="margin-left: 3rem;">
                                    <el-select v-model="queryParams.status" placeholder="选择设备" clearable
                                        style="width: 200px">
                                        <el-option v-for="item in [{ value: '1', label: 'VDAi110VV-' }]"
                                            :key="item.value" :label="item.label" :value="item.value" />
                                    </el-select>
                                </el-form-item>
                            </el-col>
                        </el-row>
                        <el-row>
                            <el-col :span="12">
                                <el-form-item label="事件发生时间：">
                                    <el-input v-model="queryParams.menuName" placeholder="事件发生时间" clearable
                                        style="width: 200px" />
                                </el-form-item>
                            </el-col>
                            <el-col :span="12">
                                <el-form-item label="系统：">
                                    <el-input v-model="queryParams.menuName" placeholder="事件发生时间" clearable
                                        style="width: 200px" />
                                </el-form-item>
                            </el-col>
                        </el-row>
                        <el-row>
                            <el-col :span="12">
                                <el-form-item label="事件发生时间：">
                                    <el-input v-model="queryParams.menuName" placeholder="事件发生时间" clearable
                                        style="width: 200px" />
                                </el-form-item>
                            </el-col>
                            <el-col :span="12">
                                <el-form-item label="系统：">
                                    <el-input v-model="queryParams.menuName" placeholder="事件发生时间" clearable
                                        style="width: 200px" />
                                </el-form-item>
                            </el-col>
                        </el-row>
                        <el-row>
                            <el-col :span="12">
                                <el-form-item label="设备：">
                                    <el-input v-model="queryParams.menuName" placeholder="设备" clearable
                                        style="width: 200px" />
                                </el-form-item>
                            </el-col>
                            <el-col :span="12">
                                <el-form-item label="事件分类：">
                                    <el-input v-model="queryParams.menuName" placeholder="事件分类" clearable
                                        style="width: 200px" />
                                </el-form-item>
                            </el-col>
                        </el-row>
                        <el-row>
                            <el-col :span="12">
                                <el-form-item label="设备：">
                                    <el-input v-model="queryParams.menuName" placeholder="设备" clearable
                                        style="width: 200px" />
                                </el-form-item>
                            </el-col>
                            <el-col :span="12">
                                <el-form-item label="事件分类：">
                                    <el-input v-model="queryParams.menuName" placeholder="事件分类" clearable
                                        style="width: 200px" />
                                </el-form-item>
                            </el-col>
                        </el-row>
                        <el-row>
                            <el-col :span="12">
                                <el-form-item label="事件描述：">
                                    <el-input v-model="queryParams.menuName" placeholder="事件描述" clearable
                                        style="width: 200px" />
                                </el-form-item>
                            </el-col>
                            <el-col :span="12">
                                <el-form-item label="LCO要求：">
                                    <el-input v-model="queryParams.menuName" placeholder="LCO要求" clearable
                                        style="width: 200px" />
                                </el-form-item>
                            </el-col>
                        </el-row>
                        <el-row>
                            <el-col :span="12">
                                <el-form-item label="运行模式：">
                                    <el-input v-model="queryParams.menuName" placeholder="运行模式" clearable
                                        style="width: 200px" />
                                </el-form-item>
                            </el-col>
                            <el-col :span="12">
                                <el-form-item label="采取模式：">
                                    <el-input v-model="queryParams.menuName" placeholder="采取模式" clearable
                                        style="width: 200px" />
                                </el-form-item>
                            </el-col>
                        </el-row>
                        <el-row>
                            <el-col :span="12">
                                <el-form-item label="设备监督：">
                                    <el-input v-model="queryParams.menuName" placeholder="设备监督" clearable
                                        style="width: 200px" />
                                </el-form-item>
                            </el-col>
                            <el-col :span="12">
                                <el-form-item label="处理时间：">
                                    <el-input v-model="queryParams.menuName" placeholder="处理时间" clearable
                                        style="width: 200px" />
                                </el-form-item>
                            </el-col>
                        </el-row>
                        <el-row>
                            <el-col :span="24">
                                <el-form-item label="后撤倒计时：">
                                    <el-input v-model="queryParams.menuName" placeholder="处理时间" clearable
                                        style="width: 200px" />
                                </el-form-item>
                            </el-col>
                        </el-row>
                    </el-form>
                </el-card>
            </el-col>
            <el-col :span="12" :xs="12">
                <el-card style="max-width: 480px">
                    <template #header>
                        <div class="card-header">
                            <span>运行技术规范卡</span>
                        </div>
                    </template>
                </el-card>
            </el-col>
        </el-row>
    </div>
</template>

<script setup name="Calculateconf">
import { infoCalculateconf, editCalculateconf } from "@/api/factoryInfo/calculateconf/calculateconf";
const { proxy } = getCurrentInstance();
import { ref } from 'vue';

const calculateconfOpen = ref(true);

const data = reactive({
    form: {
    },
    queryParams: {

    },
    rules: {
        max: [{ required: true, message: "最大值不能为空", trigger: "blur" }],
        maxacceptable: [{ required: true, type: 'number', message: "可接受上限值不能为空", trigger: "blur" }],
        min: [{ required: true, type: 'number', message: "可接受下限值不能为空", trigger: "blur" }],
        minacceptable: [{ required: true, type: 'number', message: "最小值不能为空", trigger: "blur" }],
    },
});




const { queryParams, form, rules } = toRefs(data);

function toUnlock() {
    debugger
    calculateconfOpen.value = false;
}


getInfo();
function getInfo() {
    infoCalculateconf({}).then(response => {
        form.value = response.data;
    });
}



function submitForm() {
    proxy.$refs["calculateconfRef"].validate(valid => {
        editCalculateconf(form.value).then(response => {
            proxy.$modal.msgSuccess("修改成功");
            calculateconfOpen.value = true;
            getInfo();
            proxy.$modal.msgSuccess("设置成功");
        });
    });
};



</script>


<style lang='scss' scoped>
.radio {
    margin: 20px;
}
</style>